<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/8/27
  Time: 15:06
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>Title</title>
    <link href="<%=basePath%>static/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
    <script>
        $(function() {
            var array = new Array();
            <c:forEach items="${ids}" var="item" >
            array.push("${item}"); //对象，加引号
            </c:forEach>
            for (var i = 0; i < array.length; i++) {
                $("#" + array[i]).attr("checked", "checked");
            }
        })
    </script>
</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">表单</a></li>
    </ul>
</div>
<form action="<%=basePath%>permissionController/FPPermission.do" method="post">
    <input type="hidden" name="roleIdStr" value="${role_db.roleId}">
    <div class="formbody">

        <div class="formtitle"><span>分配角色信息:&nbsp;&nbsp;&nbsp;<font color="#dc143c">${role_db.roleName}</font> &nbsp;${message}</span></div>

        <c:forEach items="${permission_dbList}" var="permission_db">
            <input type="checkbox" id="${permission_db.permissionId}" name="permissionIdSTRs" value="${permission_db.permissionId}">${permission_db.permissionName}<br>
        </c:forEach>
        <p>&nbsp; </p>
        <p>&nbsp; </p>
        <p>&nbsp; </p>
        <p>&nbsp; </p>
        <ul class="forminfo">
            <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/></li>
        </ul>
    </div>

</form>
</body>
</html>
